package com.jiajia;

import java.util.ArrayList;
import java.util.Random;

/**
 *
 * 参数设置：
 *      -Xms600m -Xmx600m
 *
 * @author : zjj
 * @date : 2022/5/1 10:47
 */
public class Demo07HeapInstance {

    byte[] buffer = new byte[new Random().nextInt(1024 * 200)];

    public static void main(String[] args) {
        ArrayList<Demo07HeapInstance> list = new ArrayList<Demo07HeapInstance>();
        while (true) {
            list.add(new Demo07HeapInstance());
            try {
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
